package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author 张永远
 * @since 2020-05-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_company")
public class CompanyDo extends Model<CompanyDo> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公司名
     */
    @TableField("name")
    private String name;

    @TableField("company_code")
    private String companyCode;

    @TableField("file_id")
    private Long fileId;

    @TableField("ship_price_version")
    private Integer shipPriceVersion;

    @TableField("create_by")
    private Long createBy;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField("delete_by")
    private Long deleteBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField("package_label")
    private Integer packageLabel;

    @TableField("product_label")
    private Integer productLabel;

    @TableField("last_invoice_type")
    private Integer lastInvoiceType;

    @TableField("last_invoice_title_id")
    private Long lastInvoiceTitleId;

    @TableField("door_quote_id")
    private Long doorQuoteId;

    @TableField("auto_stock")
    private Integer autoStock;

    /**
     * 多个仓库的accessToken的json eg.[{"id":13,"accessToken":"xxx"},{"id":14,"accessToken":"xxx"}]
     */
    @TableField(value = "mb_access_token")
    private String mbAccessToken;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
